import Mock from 'mockjs'

const files = Mock.mock({
	fileId:'@id',
	isFormat:'@integer(int32)',
	rtype:'@integer(int32)'
});

export default [
	//文件
	//添加业务文件
	{
  		url:'/general/file/addBizFile',
  		type:'post',
  		response: config => {
  			return {
  				code: 1,
  				data:{
  					...files
  				},
  				msg:''
  			}
  		}
	},
	//addSmFile
	{
  		url:'/general/file/addSmFile',
  		type:'post',
  		response: config => {
  			return {
  				code: 1,
  				data:{
  					...files
  				},
  				msg:''
  			}
  		}
	},
	//根据文件ID批量删除文件,多个逗号隔开
	{
  		url:'/general/file/batchRemoveSmFile',
  		type:'get',
  		response: config => {
  			return {
  				code: 1,
  				data:{
  					files.fileId
  				},
  				msg:''
  			}
  		}
	},
	//文件上传获取token
	{
  		url:'/general/file/getFileToken',
  		type:'post',
  		response: config => {
  			return {
  				code: 1,
  				data:{
  					...files
  				},
  				msg:''
  			}
  		}
	},
	//查询文件列表
	{
  		url:'/general/file/listFile',
  		type:'post',
  		response: config => {
  			return {
  				code: 1,
  				data:[{
  					...files
  				}],
  				msg:''
  			}
  		}
	}
]
